package com.zjsos.governmentaffairs.sokettestapplication;

import android.app.ActivityManager;
import android.content.Context;

import com.jaydenxiao.common.baseapp.BaseApplication;

public class MyApplication extends BaseApplication {


    public static final int CURRENT_DATABASE_CODE =5;

    @Override
    public void onCreate() {
        super.onCreate();
    }




    public static String getCurProcessName(Context context) {

        int pid = android.os.Process.myPid();

        ActivityManager activityManager = (ActivityManager) context
                .getSystemService(Context.ACTIVITY_SERVICE);

        for (ActivityManager.RunningAppProcessInfo appProcess : activityManager
                .getRunningAppProcesses()) {
            if (appProcess.pid == pid) {
                return appProcess.processName;
            }
        }
        return null;
    }




}
